/* Copyright (c) 2010, David Kreuter. See LICENSE for more information */

#ifndef IN_HEADERS_H
#error This file should be included through "headers.h"
#endif

typedef struct _map_ent{
	uint32 b;
	float x,y,z;
}map_ent;

typedef struct _map{
	uint32 len;
	//A
		uint32  num_collisions;
		uint16  *collision;
	//B
		uint32  num_ents;
		map_ent *ent;
	//C
		bmd     *b;
		mdl_mat *mat_backup;
	//D
		uint32  len_d;
		uint8   *d;
}map;

map *read_map(uint8 *, uint32);
int write_map(map *, uint8 *, uint32);
void free_map(map *);
uint32 size_map(map *);
void temporary_map_tex_fix(map *);
